package work20241207_chap8.n;

/**
 * @author zdl
 * @date 2024/12/7
 */
public class GerdbachGuess {
    public static void andPrimes(int n) {
        if (n <= 6 || n % 2 != 0) {
            System.out.println("必须输入一个大于6的偶数");
            return;
        }
        for (int i = 2; i <= n / 2; i++) {
            if (PrimeNum.isPrime(i) && PrimeNum.isPrime(n - i)){
                System.out.println(n + "=" + i + "+" + (n - i));
                return;
            }
        }
        System.out.println("没有符合条件的质数和");
    }

    public static void main(String[] args) {
        GerdbachGuess.andPrimes(10);
    }
}
